Integrand size = 31, antiderivative size = 70 \[ \int \csc ^2(c+d x) (a-a \csc (c+d x)) (A-A \csc (c+d x)) \, dx=\frac {a A \text {arctanh}(\cos (c+d x))}{d}-\frac {5 a A \cot (c+d x)}{3 d}+\frac {a A \cot (c+d x) \csc (c+d x)}{d}-\frac {a A \cot (c+d x) \csc ^2(c+d x)}{3 d} \]
a*A*arctanh(cos(d*x+c))/d-5/3*a*A*cot(d*x+c)/d+a*A*cot(d*x+c)*csc(d*x+c)/d -1/3*a*A*cot(d*x+c)*csc(d*x+c)^2/d
Time = 0.10 (sec) , antiderivative size = 116, normalized size of antiderivative = 1.66 \[ \int \csc ^2(c+d x) (a-a \csc (c+d x)) (A-A \csc (c+d x)) \, dx=-\frac {5 a A \cot (c+d x)}{3 d}+\frac {a A \csc ^2\left (\frac {1}{2} (c+d x)\right )}{4 d}-\frac {a A \cot (c+d x) \csc ^2(c+d x)}{3 d}+\frac {a A \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )}{d}-\frac {a A \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )}{d}-\frac {a A \sec ^2\left (\frac {1}{2} (c+d x)\right )}{4 d} \]
(-5*a*A*Cot[c + d*x])/(3*d) + (a*A*Csc[(c + d*x)/2]^2)/(4*d) - (a*A*Cot[c + d*x]*Csc[c + d*x]^2)/(3*d) + (a*A*Log[Cos[(c + d*x)/2]])/d - (a*A*Log[Si n[(c + d*x)/2]])/d - (a*A*Sec[(c + d*x)/2]^2)/(4*d)
Time = 0.55 (sec) , antiderivative size = 85, normalized size of antiderivative = 1.21, number of steps used = 12, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.355, Rules used = {2011, 3042, 4275, 3042, 4255, 3042, 4257, 4534, 3042, 4254, 24}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \csc ^2(c+d x) (a-a \csc (c+d x)) (A-A \csc (c+d x)) \, dx\) |
\(\Big \downarrow \) 2011 |
\(\displaystyle \frac {A \int \csc ^2(c+d x) (a-a \csc (c+d x))^2dx}{a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {A \int \csc (c+d x)^2 (a-a \csc (c+d x))^2dx}{a}\) |
\(\Big \downarrow \) 4275 |
\(\displaystyle \frac {A \left (\int \csc ^2(c+d x) \left (\csc ^2(c+d x) a^2+a^2\right )dx-2 a^2 \int \csc ^3(c+d x)dx\right )}{a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {A \left (\int \csc (c+d x)^2 \left (\csc (c+d x)^2 a^2+a^2\right )dx-2 a^2 \int \csc (c+d x)^3dx\right )}{a}\) |
\(\Big \downarrow \) 4255 |
\(\displaystyle \frac {A \left (\int \csc (c+d x)^2 \left (\csc (c+d x)^2 a^2+a^2\right )dx-2 a^2 \left (\frac {1}{2} \int \csc (c+d x)dx-\frac {\cot (c+d x) \csc (c+d x)}{2 d}\right )\right )}{a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {A \left (\int \csc (c+d x)^2 \left (\csc (c+d x)^2 a^2+a^2\right )dx-2 a^2 \left (\frac {1}{2} \int \csc (c+d x)dx-\frac {\cot (c+d x) \csc (c+d x)}{2 d}\right )\right )}{a}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle \frac {A \left (\int \csc (c+d x)^2 \left (\csc (c+d x)^2 a^2+a^2\right )dx-2 a^2 \left (-\frac {\text {arctanh}(\cos (c+d x))}{2 d}-\frac {\cot (c+d x) \csc (c+d x)}{2 d}\right )\right )}{a}\) |
\(\Big \downarrow \) 4534 |
\(\displaystyle \frac {A \left (\frac {5}{3} a^2 \int \csc ^2(c+d x)dx-2 a^2 \left (-\frac {\text {arctanh}(\cos (c+d x))}{2 d}-\frac {\cot (c+d x) \csc (c+d x)}{2 d}\right )-\frac {a^2 \cot (c+d x) \csc ^2(c+d x)}{3 d}\right )}{a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {A \left (\frac {5}{3} a^2 \int \csc (c+d x)^2dx-2 a^2 \left (-\frac {\text {arctanh}(\cos (c+d x))}{2 d}-\frac {\cot (c+d x) \csc (c+d x)}{2 d}\right )-\frac {a^2 \cot (c+d x) \csc ^2(c+d x)}{3 d}\right )}{a}\) |
\(\Big \downarrow \) 4254 |
\(\displaystyle \frac {A \left (-\frac {5 a^2 \int 1d\cot (c+d x)}{3 d}-2 a^2 \left (-\frac {\text {arctanh}(\cos (c+d x))}{2 d}-\frac {\cot (c+d x) \csc (c+d x)}{2 d}\right )-\frac {a^2 \cot (c+d x) \csc ^2(c+d x)}{3 d}\right )}{a}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {A \left (-2 a^2 \left (-\frac {\text {arctanh}(\cos (c+d x))}{2 d}-\frac {\cot (c+d x) \csc (c+d x)}{2 d}\right )-\frac {5 a^2 \cot (c+d x)}{3 d}-\frac {a^2 \cot (c+d x) \csc ^2(c+d x)}{3 d}\right )}{a}\) |
(A*((-5*a^2*Cot[c + d*x])/(3*d) - (a^2*Cot[c + d*x]*Csc[c + d*x]^2)/(3*d) - 2*a^2*(-1/2*ArcTanh[Cos[c + d*x]]/d - (Cot[c + d*x]*Csc[c + d*x])/(2*d)) ))/a
3.1.20.3.1 Defintions of rubi rules used
Int[(u_.)*((a_) + (b_.)*(v_))^(m_.)*((c_) + (d_.)*(v_))^(n_.), x_Symbol] :> Simp[(b/d)^m Int[u*(c + d*v)^(m + n), x], x] /; FreeQ[{a, b, c, d, n}, x ] && EqQ[b*c - a*d, 0] && IntegerQ[m] && ( !IntegerQ[n] || SimplerQ[c + d*x , a + b*x])
Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1) Subst[Int[Exp andIntegrand[(1 + x^2)^(n/2 - 1), x], x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* x]*((b*Csc[c + d*x])^(n - 1)/(d*(n - 1))), x] + Simp[b^2*((n - 2)/(n - 1)) Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && IntegerQ[2*n]
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^2, x_Symbol] :> Simp[2*a*(b/d) Int[(d*Csc[e + f*x])^(n + 1), x], x] + Int[(d*Csc[e + f*x])^n*(a^2 + b^2*Csc[e + f*x]^2), x] /; FreeQ[{a, b, d, e, f, n}, x]
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*(csc[(e_.) + (f_.)*(x_)]^2*(C_.) + (A_)), x_Symbol] :> Simp[(-C)*Cot[e + f*x]*((b*Csc[e + f*x])^m/(f*(m + 1) )), x] + Simp[(C*m + A*(m + 1))/(m + 1) Int[(b*Csc[e + f*x])^m, x], x] /; FreeQ[{b, e, f, A, C, m}, x] && NeQ[C*m + A*(m + 1), 0] && !LeQ[m, -1]
Time = 1.30 (sec) , antiderivative size = 74, normalized size of antiderivative = 1.06
method | result | size |
derivativedivides | \(\frac {A a \left (-\frac {2}{3}-\frac {\csc \left (d x +c \right )^{2}}{3}\right ) \cot \left (d x +c \right )-2 A a \left (-\frac {\csc \left (d x +c \right ) \cot \left (d x +c \right )}{2}+\frac {\ln \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )}{2}\right )-A a \cot \left (d x +c \right )}{d}\) | \(74\) |
default | \(\frac {A a \left (-\frac {2}{3}-\frac {\csc \left (d x +c \right )^{2}}{3}\right ) \cot \left (d x +c \right )-2 A a \left (-\frac {\csc \left (d x +c \right ) \cot \left (d x +c \right )}{2}+\frac {\ln \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )}{2}\right )-A a \cot \left (d x +c \right )}{d}\) | \(74\) |
parts | \(-\frac {a A \cot \left (d x +c \right )}{d}+\frac {A a \left (-\frac {2}{3}-\frac {\csc \left (d x +c \right )^{2}}{3}\right ) \cot \left (d x +c \right )}{d}+\frac {a A \cot \left (d x +c \right ) \csc \left (d x +c \right )}{d}-\frac {A a \ln \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )}{d}\) | \(80\) |
parallelrisch | \(-\frac {A a \left (\cot \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}-\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}-6 \cot \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+6 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+21 \cot \left (\frac {d x}{2}+\frac {c}{2}\right )+24 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-21 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{24 d}\) | \(93\) |
risch | \(-\frac {2 A a \left (3 i {\mathrm e}^{4 i \left (d x +c \right )}+3 \,{\mathrm e}^{5 i \left (d x +c \right )}-12 i {\mathrm e}^{2 i \left (d x +c \right )}+5 i-3 \,{\mathrm e}^{i \left (d x +c \right )}\right )}{3 d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{3}}-\frac {A a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{d}+\frac {A a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{d}\) | \(108\) |
norman | \(\frac {-\frac {A a}{24 d}+\frac {A a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}-\frac {7 A a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{8 d}+\frac {7 A a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{8 d}-\frac {A a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{4 d}+\frac {A a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}}{24 d}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}-\frac {A a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}\) | \(127\) |
1/d*(A*a*(-2/3-1/3*csc(d*x+c)^2)*cot(d*x+c)-2*A*a*(-1/2*csc(d*x+c)*cot(d*x +c)+1/2*ln(-cot(d*x+c)+csc(d*x+c)))-A*a*cot(d*x+c))
Leaf count of result is larger than twice the leaf count of optimal. 135 vs. \(2 (66) = 132\).
Time = 0.25 (sec) , antiderivative size = 135, normalized size of antiderivative = 1.93 \[ \int \csc ^2(c+d x) (a-a \csc (c+d x)) (A-A \csc (c+d x)) \, dx=-\frac {10 \, A a \cos \left (d x + c\right )^{3} + 6 \, A a \cos \left (d x + c\right ) \sin \left (d x + c\right ) - 12 \, A a \cos \left (d x + c\right ) - 3 \, {\left (A a \cos \left (d x + c\right )^{2} - A a\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) + 3 \, {\left (A a \cos \left (d x + c\right )^{2} - A a\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right )}{6 \, {\left (d \cos \left (d x + c\right )^{2} - d\right )} \sin \left (d x + c\right )} \]
-1/6*(10*A*a*cos(d*x + c)^3 + 6*A*a*cos(d*x + c)*sin(d*x + c) - 12*A*a*cos (d*x + c) - 3*(A*a*cos(d*x + c)^2 - A*a)*log(1/2*cos(d*x + c) + 1/2)*sin(d *x + c) + 3*(A*a*cos(d*x + c)^2 - A*a)*log(-1/2*cos(d*x + c) + 1/2)*sin(d* x + c))/((d*cos(d*x + c)^2 - d)*sin(d*x + c))
\[ \int \csc ^2(c+d x) (a-a \csc (c+d x)) (A-A \csc (c+d x)) \, dx=A a \left (\int \csc ^{2}{\left (c + d x \right )}\, dx + \int \left (- 2 \csc ^{3}{\left (c + d x \right )}\right )\, dx + \int \csc ^{4}{\left (c + d x \right )}\, dx\right ) \]
A*a*(Integral(csc(c + d*x)**2, x) + Integral(-2*csc(c + d*x)**3, x) + Inte gral(csc(c + d*x)**4, x))
Time = 0.23 (sec) , antiderivative size = 87, normalized size of antiderivative = 1.24 \[ \int \csc ^2(c+d x) (a-a \csc (c+d x)) (A-A \csc (c+d x)) \, dx=-\frac {3 \, A a {\left (\frac {2 \, \cos \left (d x + c\right )}{\cos \left (d x + c\right )^{2} - 1} - \log \left (\cos \left (d x + c\right ) + 1\right ) + \log \left (\cos \left (d x + c\right ) - 1\right )\right )} + \frac {6 \, A a}{\tan \left (d x + c\right )} + \frac {2 \, {\left (3 \, \tan \left (d x + c\right )^{2} + 1\right )} A a}{\tan \left (d x + c\right )^{3}}}{6 \, d} \]
-1/6*(3*A*a*(2*cos(d*x + c)/(cos(d*x + c)^2 - 1) - log(cos(d*x + c) + 1) + log(cos(d*x + c) - 1)) + 6*A*a/tan(d*x + c) + 2*(3*tan(d*x + c)^2 + 1)*A* a/tan(d*x + c)^3)/d
Time = 0.28 (sec) , antiderivative size = 123, normalized size of antiderivative = 1.76 \[ \int \csc ^2(c+d x) (a-a \csc (c+d x)) (A-A \csc (c+d x)) \, dx=\frac {A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 6 \, A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 24 \, A a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) + 21 \, A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + \frac {44 \, A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 21 \, A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 6 \, A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - A a}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3}}}{24 \, d} \]
1/24*(A*a*tan(1/2*d*x + 1/2*c)^3 - 6*A*a*tan(1/2*d*x + 1/2*c)^2 - 24*A*a*l og(abs(tan(1/2*d*x + 1/2*c))) + 21*A*a*tan(1/2*d*x + 1/2*c) + (44*A*a*tan( 1/2*d*x + 1/2*c)^3 - 21*A*a*tan(1/2*d*x + 1/2*c)^2 + 6*A*a*tan(1/2*d*x + 1 /2*c) - A*a)/tan(1/2*d*x + 1/2*c)^3)/d
Time = 20.14 (sec) , antiderivative size = 119, normalized size of antiderivative = 1.70 \[ \int \csc ^2(c+d x) (a-a \csc (c+d x)) (A-A \csc (c+d x)) \, dx=\frac {7\,A\,a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{8\,d}-\frac {A\,a\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}-\frac {{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (7\,A\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-2\,A\,a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+\frac {A\,a}{3}\right )}{8\,d}-\frac {A\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{4\,d}+\frac {A\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{24\,d} \]